package tests;

import static org.junit.Assert.*;

import org.junit.Test;

import beans.RegistrationBean;

public class Tests {

	@Test
	public void Test_doesUserAlreadyExist_MethodWithNonExistingUsername() 
	{
		RegistrationBean heinzBean = new RegistrationBean();
		assertFalse(heinzBean.doesUsernameAlreadyExist("shouldBeFalse"));
	}
	
	@Test
	public void Test_doesUserAlreadyExist_MethodWithAlreadyExistingUsername() 
	{
		RegistrationBean heinzBean = new RegistrationBean();
		assertTrue(heinzBean.doesUsernameAlreadyExist("gandalf"));
	}

	@Test
	public void Test_doesUserAlreadyExist_MethodWithEmptyUsername() 
	{
		RegistrationBean heinzBean = new RegistrationBean();
		assertFalse(heinzBean.doesUsernameAlreadyExist(""));
	}
}
